package Page.PaperPage;
import Navigation.NavigationController;
import DataClass.Paper;

import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;

import java.util.List;
public class PaperModel {
    ListProperty<Paper> dataList = new SimpleListProperty<>(FXCollections.observableArrayList());

    public ListProperty<Paper> dataListProperty() {
        return dataList;
    }

    public ObservableList<Paper> getDataList() {
        return dataList.get();
    }

    public void setDataList(ObservableList<Paper> dataList) {
        this.dataList.set(dataList);
    }

    public void setDataList(List<Paper> dataList) {

        setDataList(FXCollections.observableArrayList(dataList));
    }

    @FXML
    public void backButtonClicked(){
        NavigationController.back();
    }
}
